import http from './http.js';
// 登录
export function login(params) {
    return http.post(`/req/login`,params)
}
// 注册
export function regiUser(params) {
    return http.post(`/req/user`,params)
}
// 获取所有用户
export function getAllUser(params) {
    return http.get(`/req/user`,params)
}
export function deleteUser(userId) {
    return http.delete(`/req/user?userId=${userId}`)
}
export function getWeiboAnalysis(params) {
    return http.get(`/req/weibo/analysis`)
}
export function getWeiboCount(params) {
    return http.get(`/req/weibo/count`)
}
export function getWeiboSearch(params) {
    return http.get(`/req/weibo/search`)
}
export function getWeiboTask(params) {
    return http.get(`/req/weibo?curPageNum=${params.curPageNum}&perPageNum=${params.perPageNum}&search_info=${params.search_info}`)
}

export function getWeiboSpider(params) {
    return http.get(`/req/weibo/task`)
}
export function modifyWeiboSpider(params) {
    return http.put(`/req/weibo/task`,params)
}
export function sendWeiboSpider(params) {
    return http.post(`/req/weibo/task`,params)
}
export function delWeiboSpider(id) {
    return http.delete(`/req/weibo/task?taskId=${id}`)
}

export function register(params) {
    return http.post(`/req/api/user/user`,params)
}
export function getWeiboPL() {
    return http.get(`/req/weibo/search`)
}

export function getWeiboIndex() {
    return http.get(`/req/weibo/trend`)
}

export function getWorldData() {
    return http.get(`https://api.inews.qq.com/newsqa/v1/automation/foreign/country/ranklist`)
}
export function getChineseData() {
    return http.get(`https://api.inews.qq.com/newsqa/v1/query/inner/publish/modules/list?modules=statisGradeCityDetail,diseaseh5Shelf`)
}
export function getProvinceData(areaCode) {
    return http.get(`/test/ug/api/wuhan/app/data/list-by-area-code?areaCode=${areaCode}`)
}
export function getWorldTotalNum() {
    return http.get(`/req/api/covid/summary/world`)
}
export function getCovidWorld() {
    return http.get(`/req/api/covid/world`)
}
export function getCovidChina() {
    return http.get(`/req/api/covid/china`)
}
export function getCovidProvince() {
    return http.get(`/req/api/covid/province`)
}


